package com.inventles.data.pojo;

// Generated Dec 21, 2013 2:31:29 AM by Hibernate Tools 4.0.0

import java.util.Date;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlRootElement;

/**
 * ItemTransaction generated by hbm2java
 */
@Entity
@Table(name = "item_transaction", catalog = "inventles")
@XmlRootElement
@XmlAccessorType(XmlAccessType.FIELD)
public class ItemTransaction implements java.io.Serializable {

	private static final long serialVersionUID = 1L;
	private int transactionId;
	private Item item;
	private Date date;
	private String quantity;
	private String flow;

	public ItemTransaction() {
	}

	public ItemTransaction(int transactionId, Item item, Date date,
			String quantity, String flow) {
		this.transactionId = transactionId;
		this.item = item;
		this.date = date;
		this.quantity = quantity;
		this.flow = flow;
	}

	@Id
	@Column(name = "transaction_id", unique = true, nullable = false)
	public int getTransactionId() {
		return this.transactionId;
	}

	public void setTransactionId(int transactionId) {
		this.transactionId = transactionId;
	}

	@ManyToOne(fetch = FetchType.EAGER)
	@JoinColumn(name = "item_id", nullable = false)
	public Item getItem() {
		return this.item;
	}

	public void setItem(Item item) {
		this.item = item;
	}

	@Temporal(TemporalType.TIMESTAMP)
	@Column(name = "date", nullable = false, length = 19)
	public Date getDate() {
		return this.date;
	}

	public void setDate(Date date) {
		this.date = date;
	}

	@Column(name = "quantity", nullable = false, length = 45)
	public String getQuantity() {
		return this.quantity;
	}

	public void setQuantity(String quantity) {
		this.quantity = quantity;
	}

	@Column(name = "flow", nullable = false, length = 45)
	public String getFlow() {
		return this.flow;
	}

	public void setFlow(String flow) {
		this.flow = flow;
	}

}
